package com.example.courseselectionsystemconsume.controller;

import com.example.courseselectionsystemconsume.timerTasks.service.Timer1Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description: TODO
 * @author: Tokyo_God
 * @date: 2021/1/9 20:45
 * Role of:
 * @version: v1.0
 */
@RestController
public class TestController {

    @Autowired
    Timer1Service timer1Service;

    //测试开启定时器
    @RequestMapping("a")
    public String startCron1(){
        timer1Service.startCron();
        return "";
    }

    //测试关闭定时器
    @RequestMapping("b")
    public String stopCron1(){
        timer1Service.stopCron();
        return "";
    }

}
